n = int(input())

if n == 1:
    print(7)
elif n == 2:
    print(5)
elif n == 3:
    print(4)
elif n == 4:
    print(3)
elif n == 5:
    print(2)
elif n == 6:
    print(1)
else:
    print('error!')
